<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="../../../js/jquery-1.9.0.js"></script>
<link href="../../../css/style.css" rel="stylesheet" type="text/css">
<script src="../../script/common.js"></script>
</head>
<body>

<div class="page_title">客户信息管理 > 客户信息 > 历史订单 </div>
<div class="button_bar">
	<button class="common_button" onclick="help('');">帮助</button>  
	<button class="common_button" onclick="back();">返回</button>  
</div>
	<table class="query_form_table">
		<tr>
			<th>客户编号</th>
			<td id="odrCustNo"></td>
			<th>客户名称</th>
			<td id="odrCustName"></td>
		</tr>
	</table>
	<br />
	<table class="data_list_table">
		<tr>
			<th>订单编号</th>
			<th>日期</th>
			<th>送货地址</th>
			<th>状态</th>
			<th>操作</th>
		</tr>
		<tbody id="showAll">

		</tbody>
		<tr>
			<th colspan="100" class="pager">
				<div class="pager">
					共59条记录 每页<input value="10" size="2" />条
					第<input value="1" size="2"/>页/共5页
					<a href="#">第一页</a>
					<a href="#">上一页</a>
					<a href="#">下一页</a>
					<a href="#">最后一页</a>
					转到<input value="1" size="2" />页
					<button width="20" onclick="reload();">GO</button>
				</div>
			</th>
		</tr>
	</table>
</body>
</html>
<script type="text/javascript">
	$(function () {
        showAllVOrder();
    });
	function showAllVOrder() {
	    var odrCustNo;
	    var odrCustName;
	    var str;
		$.ajax({
			url:"/VOrder/findVOrdersByOdrCustNo",
			data:{"odrCustNo":UrlSearch()},
            dataType:'json',
            contentType:"application/json;charset=utf-8",
            success:function (vOrdersList) {
                $.each(vOrdersList,function (i,vOrders) {
                    odrCustNo=vOrders.odrCustNo;
                    odrCustName=vOrders.odrCustName;
//                    str=(vOrders.odrId+","+vOrders.odrDate+","+vOrders.odrAddr+","+vOrders.odrStatus);
//                    console.info(str);
                    var tr=//
                        "<tr>"+
                        "<td class='list_data_text'>"+vOrders.odrId+"</td>"+
                        "<td class='list_data_text'>"+vOrders.odrDate+"</td>"+
                        "<td class='list_data_text'>"+vOrders.odrAddr+"</td>"+
                        "<td class='list_data_text'>"+vOrders.odrStatus+"</td>"+
						"<td class='list_data_op'> <a href='orders_detail.html?odrId="+vOrders.odrId+"&odrDate="+vOrders.odrDate+"&odrAddr="+vOrders.odrAddr+"&odrStatus="+vOrders.odrStatus+"'><img title='查看明细' src='../../../images/bt_detail.gif' class='op_button' /></a> </td>"	+
                        "</tr>";
                    $("#showAll").append(tr);
                })
                $("#odrCustNo").append(odrCustNo);
                $("#odrCustName").append(odrCustName);
            }
		});
    }

    function UrlSearch(){
        var name,value;
        var str=location.href; //取得整个地址栏
        var num=str.indexOf("=")
        str=str.substr(num+1); //取得所有参数   stringvar.substr(start [, length ]
        return str;
    }

</script>

<!--<tr>
	<td class="list_data_text">1343445</td>
	<td class="list_data_text">2007年11月13日</td>
	<td class="list_data_text">北京海淀区劳动路205号</td>
	<td class="list_data_text">未回款</td>
	<td class="list_data_op">
		<img onclick="to('orders_detail.html');" title="查看明细" src="../../images/bt_detail.gif" class="op_button" /></td>
</tr>
<tr>
	<td class="list_data_text">1343444</td>
	<td class="list_data_text">2007年10月29日</td>
	<td class="list_data_text">北京海淀区劳动路205号</td>
	<td class="list_data_text">已回款</td>
	<td class="list_data_op">
		<img onclick="to('orders_detail.html');" title="查看明细" src="../../images/bt_detail.gif" class="op_button" />
	</td>
</tr>
<tr>
	<td class="list_data_text">1343443</td>
	<td class="list_data_text">2007年10月29日</td>
	<td class="list_data_text">北京海淀区劳动路205号</td>
	<td class="list_data_text">已回款</td>
	<td class="list_data_op">
		<img onclick="to('orders_detail.html');" title="查看明细" src="../../images/bt_detail.gif" class="op_button" />
		&nbsp;
	</td>
</tr>-->
